Skip to main content

All Questions

2votes
2answers
1kviews

Ring of numbers where adjacent entries sum up to a prime

Given a number n, find a permutation of the numbers 1...n such that all adjacent entries sum up to primes. If such a permutation does not exist, throw an error. Is there a purely-functional way to do ...
ithisa's user avatar

close